package com.summer.springboot.ch3;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

/**
 * Created by thinkpad on 2018/7/8.
 */

@Service
public class AsyncTaskService {



    @Async
    public void executeAsyncTask(Integer i){

        System.out.println("执行异步任务" + i);

    }

    @Async
    public void executeAsyncTaskPlus(Integer i){
        System.out.println("执行异步任务+1" + (i + 1));
    }


}
